package mest.dao.LGF.PlanPurchaseMoney;


import mest.VO.LGF.PlanPurchaseMoney.plan_purchasemoney;
import mest.VO.LGF.PlanPurchaseMoney.plan_purchasemoneyrecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-12-18 14:33
 */
public interface IPurchaseMoneyDao   {

    //1.未完成基本查询-数量
    int countNOFinish(@Param("theirDb") String theirDb);

    //2.未完成基本查询-分页
    List<plan_purchasemoney> selectAllNOFinish(@Param("theirDb") String theirDb,@Param("index") int index,@Param("pageSize") int pageSize);

    //3.已完成基本查询-数量
    int countFinish(@Param("theirDb") String theirDb);

    //4.已完成基本查询-分页
    List<plan_purchasemoney> selectAllFinish(@Param("theirDb") String theirDb,@Param("index") int index,@Param("pageSize") int pageSize);

    //往期记录--分页
    List<plan_purchasemoneyrecord> selectPastRecord(@Param("theirDb") String theirDb,@Param("ppmId") int ppmId,@Param("index") int index,@Param("pageSize") int pageSize);
    //往期记录--数量
    int selectPastRecordCount(@Param("theirDb") String theirDb);

    //收款完毕
    int updateByPPMId(@Param("theirDb") String theirDb,@Param("ppmId") int ppmId,@Param("status")int status) throws Exception;


    //alert层的提交,插入记录
    int insertByPPMR(plan_purchasemoneyrecord ppmr) throws Exception;

//alert层的提交,插入财务流表
    int insertFinancial_Purchasemoney(plan_purchasemoneyrecord ppmr) throws Exception;
    //alert层提交完毕后，更新字典表
    int updateFinancial_PurchasemoneyNumber(@Param("theirDb") String theirDb) throws Exception;

    //接口，根据poId生成计划采购付款单
    int insertPlanPurchaseMoneyOrdrByPOID(@Param("theirDb") String theirDb,@Param("poId")int poId) throws Exception;
    //接口，更新字典表中PlanPurchaseMoneyNumber
    int updatePlanPurchaseMoneyNumber(@Param("theirDb") String theirDb) throws Exception;
}
